﻿using System.Windows.Forms;
using System.Management;
using System.Diagnostics;

namespace Pipes.Queries
{
  public partial class Main : Form
  {
    public Main()
    {
      InitializeComponent();

      //WqlObjectQuery wqlQuery =
      //      new WqlObjectQuery("SELECT * FROM meta_class"); //  WHERE __Class = 'Win32_LogicalDisk' SELECT * FROM Win32_LogicalDisk
      //ManagementObjectSearcher searcher =
      //    new ManagementObjectSearcher(wqlQuery);

      //foreach (ManagementObject obj in searcher.Get())
      //{
      //  Debug.Print(obj.ToString());
      //  foreach (var prop in obj.Properties)
      //  {
      //    Debug.Print("{0} = {1} ({2})", prop.Name, prop.Value, prop.Type);
      //  }
      //}

      //var parser = new PqlParser();
      //parser.Setup();
      //var query = "SELECT IIF(Sex='F', 'Ms. ', 'Mr. ') & LastName AS Salutation FROM tblPeople ORDER BY Sex, Salary;";
      //using (var reader = new System.IO.StringReader(query)) {
      //  parser.Parse(reader);
      //}
      //Debug.Print(parser.Script.ToString());
      //var result = parser.Script;
    }
  }
}
